using Boo.Lang.Runtime;
using System;
using UnityEngine;
using UnityScript.Lang;

[Serializable]
public class local_0020tournament : MonoBehaviour
{
	public int played;

	public bool won;

	public GameObject bronze;

	public GameObject silver;

	public GameObject gold;

	public GameObject[] arenas;

	public void Awake()
	{
		UnityEngine.Object.DontDestroyOnLoad(gameObject);
	}

	public void OnLevelWasLoaded()
	{
		bronze = GameObject.Find("bronze");
		silver = GameObject.Find("silver");
		gold = GameObject.Find("gold");
		if (RuntimeServices.EqualityOperator(UnityEngine.SceneManagement.SceneManager.GetActiveScene().buildIndex, "career") && played == 2 && !won)
		{
			bronze.active = true;
		}
		arenas[0] = GameObject.Find("arena1");
		arenas[1] = GameObject.Find("arena2");
		arenas[2] = GameObject.Find("arena3");
		arenas[3] = GameObject.Find("arena4");
		arenas[4] = GameObject.Find("arena5");
		arenas[5] = GameObject.Find("arena6");
		arenas[UnityEngine.Random.Range(0, Extensions.get_length((System.Array)arenas))].SetActiveRecursively(state: true);
	}

	public void Main()
	{
	}
}
